package com.example.springboot_practice.Controller;

import com.example.springboot_practice.Entity.Sort;
import com.example.springboot_practice.Entity.Student;
import com.example.springboot_practice.Service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Description: springboot练习  测试配置多数据源
 * @Author 王宝凯
 * @Date 2020/9/5·
 */
@RestController
public class TestController {

   /* @RequestMapping("hello")
    private String hello(){
        return "hello springboot";
    }*/
    @Autowired
    TestService testService;
    @RequestMapping("/test")
    public void test(){
        List<Sort> sortList = testService.sortList();
        List<Student> studentList = testService.studentList();
        System.out.println(sortList);
        System.out.println(studentList);
    }

}
